﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;

namespace LPBToolsLib
{
    class StationsOnline
    {
    }
    /// <summary>
    /// 工作站运行信息对象
    /// 仅为基础结果，具体需要为基础进行继承
    /// </summary>
    public class StationInfo: RecordBase
    {
        public DateTime CreateTime { get; } = DateTime.Now;
        /// <summary>
        /// 工作站运行的令牌
        /// 使用过程中不可修改
        /// </summary>
        public string Token { get; private set; } = Guid.NewGuid().ToString("N").ToUpper();
        /// <summary>
        /// 工作站最后活动时间
        /// </summary>
        public DateTime LastAction { get; set; } = DateTime.Now;
        /// <summary>
        /// 工作站ID
        /// 使用过程中不可修改
        /// </summary>
        public int ID { get; private set; } = 0;
        /// <summary>
        /// 工作站具体信息结构体
        /// 使用过程中不可修改
        /// </summary>
        private object tDatas { get; set; } = "";

        public object Datas { get { return tDatas; } }
        public StationInfo(string DestJSONValues) : base(DestJSONValues)
        {
        }
        public StationInfo(Dictionary<string, object> Detail) : base(JsonConvert.SerializeObject(Detail))
        {
        }
        public StationInfo(int DestID, object DestDatas):base("")
        {
            ID = DestID;
            tDatas = DestDatas;
        }
             
    }
    public enum StaActionType
    {
        None = 0,
        Login,
        Logout,
        LostConnection,
    }
}
